# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Content.V21.Model.MerchantCenterDestination do
  @moduledoc """
  "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created.

  ## Attributes

  *   `attributionSettings` (*type:* `GoogleApi.Content.V21.Model.AttributionSettings.t`, *default:* `nil`) - Required. Attribution settings being used for the Merchant Center Destination.
  *   `currencyCode` (*type:* `String.t`, *default:* `nil`) - Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
  *   `destinationId` (*type:* `String.t`, *default:* `nil`) - Output only. Merchant Center Destination ID.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attributionSettings => GoogleApi.Content.V21.Model.AttributionSettings.t() | nil,
          :currencyCode => String.t() | nil,
          :destinationId => String.t() | nil,
          :displayName => String.t() | nil
        }

  field(:attributionSettings, as: GoogleApi.Content.V21.Model.AttributionSettings)
  field(:currencyCode)
  field(:destinationId)
  field(:displayName)
end

defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.MerchantCenterDestination do
  def decode(value, options) do
    GoogleApi.Content.V21.Model.MerchantCenterDestination.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.MerchantCenterDestination do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
